package cn.iocoder.yudao.module.scrm.dal.mysql.schedulesteacher;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.scrm.controller.admin.schedules.vo.SchedulesTeacherPageReqVO;
import cn.iocoder.yudao.module.scrm.dal.dataobject.schedulesteacher.SchedulesTeacherDO;
import cn.iocoder.yudao.module.scrm.dal.dataobject.teacher.TeacherDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


/**
 * 排期老师 Mapper
 *
 * @author admin
 */
@Mapper
public interface SchedulesTeacherMapper extends BaseMapperX<SchedulesTeacherDO> {

    default PageResult<SchedulesTeacherDO> selectPage(SchedulesTeacherPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SchedulesTeacherDO>()
                .eqIfPresent(SchedulesTeacherDO::getSchedulesId, reqVO.getSchedulesId())
                .eqIfPresent(SchedulesTeacherDO::getTeacherId, reqVO.getTeacherId())
                .orderByDesc(SchedulesTeacherDO::getId));
    }

    List<TeacherDO> queryTeacherByScheduleId(List<Long> scheduleIds);

}